﻿using FinalPointSet.Model.Manager;
using System.Collections.Generic;

namespace FinalPointSet.Model.Model.Knowledge
{
    public class CustomParamHelper
    {
        public static string Generate(RunnableScript script)
        {
            return RunnableScriptHelper.GenerateWithLog(script, "{}");
        }

        public static Dictionary<string, string> GenerateCustomParams()
        {
            Dictionary<string, string> paramsDict = [];
            List<CustomParam> customParams = AssetManager.Instance.GetJsonObjectList<CustomParam>();
            foreach (CustomParam item in customParams)
            {
                paramsDict.Add($"#{{{item.Name}}}", Generate(item));
            }
            return paramsDict;
        }
    }
}
